import { createRouter, createWebHistory } from 'vue-router'

//hdjsabdhjavdhjavadasasd
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      component: () => import('@/views/login/Login.vue')
    },
    {
      path: '/',
      component: () => import('@/views/home/Home.vue'),
      redirect: '/file',
      children: [
        {
          path: 'file',
          component: () => import('@/views/home/file/File.vue')
        },
        {
          path: 'plan',
          component: () => import('@/views/home/plan/Plan.vue')
        },
        {
          path: 'community',
          component: () => import('@/views/home/community/Community.vue')
        },
        {
          path: '/user/:id',
          component: () => import('@/views/home/user/User.vue')
        }
      ]
    }
  ]
})

export default router
